<?php
	class user_admin_model extends CI_Model{
		private $table = 'medicine_kit_user_admin';
		function __construct(){
			parent::__construct();
			$this->dbdefault = $this->load->database('passport', true);
		}

		function insert($data){
			$this->dbdefault->insert($this->table, $data);
			return $this->dbdefault->insert_id();
		}

		function selectCode($where = array(), $select =''){
			if(!empty($where)){
				$this->dbdefault->where($where);
			}

			if(!empty($select)){
				$this->dbdefault->select($select);
			}
			return $this->dbdefault->get($this->table)->row_array();
		}
		function doQuery($query){			
			return $this->dbdefault->query($query)->result_array();
		}
		function doInsert($query){
			return $this->dbdefault->query($query);
		}

	

	}
?>